{extend name="header_admin" /}
{block name="title"}上传策略- {$options.siteName}{/block}
{block name="content"}
<div class="content-wrapper">
  <div class="container-fluid">
    <!-- Breadcrumbs-->
    <ol class="breadcrumb">
      <li class="breadcrumb-item">
        <a href="/Admin">管理面板</a>
      </li>
      <li class="breadcrumb-item active">用户组</li>
    </ol>
    
    <!-- Area Chart Example-->
    <div class="row">
      <div class="col-12">
        <h2>用户组</h2>
        <br>

        
        <div class="card mb-3">
          <div class="card-header">
          <i class="fa fa-table"></i> 用户组列表</div>
          <div class="card-body">
            <div class="table-responsive">
              <div id="dataTable_wrapper" class="dataTables_wrapper container-fluid dt-bootstrap4"><div class="row"><div class="col-sm-12 col-md-6"><div class="dataTables_length" ><label>每页展示 <select id="dataTable_length" aria-controls="dataTable" class="form-control form-control-sm"><option value="10">10</option><option value="25">25</option><option value="50">50</option><option value="100">100</option></select> 个</label></div></div></div><div class="row"><div class="col-sm-12">
              <div class="table-responsive">
                <table class="table table-bordered dataTable" id="dataTable" width="100%" cellspacing="0" role="grid" aria-describedby="dataTable_info" style="width: 100%;">
                  <thead>
                    <tr role="row" class="textCenter"><th>#</th><th>名称</th><th class="textCenter">上传策略</th><th class="textCenter">最大容量</th><th class="textCenter">下属用户数</th><th class="textCenter">操作</th></tr>
                  </thead>
                  <tfoot>
                  <tr><th rowspan="1" colspan="1" class="textCenter">#</th><th rowspan="1" colspan="1">名称</th><th rowspan="1" colspan="1" class="textCenter">上传策略</th><th rowspan="1" colspan="1" class="textCenter">最大容量</th><th rowspan="1" colspan="1" class="textCenter">下属用户数</th><th rowspan="1" colspan="1" class="textCenter">操作</th></tr>
                  </tfoot>
                  <tbody>
                    <tr role="row" class="odd" id="fileList">
                      
                      {volist name='list' id='group'}
                      <tr role="row" class="odd">
                        <td class="sorting_1 textCenter">{$group.id}</td>
                        <td>
                         {$group.group_name}
                        </td>
                        <td class="textCenter">
                        {$originList[$key]["policy"]["policy_name"]}
                        </td>
                        <td class="textCenter">{:countSize($group["max_storage"])}</td>
                        <td class="textCenter">{$originList[$key]["user_num"]}</td>
                        <td class="textCenter"><button type="button" class="btn btn-secondary fix" data-toggle="tooltip" data-placement="top" title="删除" data-action="delete" data-id="{$group.id}" data-unable="{eq name="$originList[$key]['user_num']" value="0"}0{else}1{/eq}"><i class="fa fa-trash" aria-hidden="true"></i></button>
                          <button type="button" class="btn btn-secondary fix" data-toggle="tooltip" data-placement="top" title="编辑" data-action="edit" data-id="{$group.id}"><i class="fa fa-edit" aria-hidden="true"></i></button>
             
                        </td>
                      </tr>
                      {/volist}
                    </tbody>
                  </table>
                </div>
                <div class="col-md-5 mb-2 mt-2" style="display: none" id="del">
                  <button type="button" class="btn btn-danger" id="delAll"><i class="fa fa-trash" aria-hidden="true"></i> 删除选中文件</button>
                </div>
                </div></div><div class="row"><div class="col-sm-12 col-md-5"><div class="dataTables_info" id="dataTable_info" role="status" aria-live="polite">展示第 {$pageNow} 页，共 {$pageTotal} 页 {$dataTotal} 条数据</div></div><div class="col-sm-12 col-md-7">
                <div class="dataTables_paginate paging_simple_numbers" id="dataTable_paginate">
                  {$list->render()}
                </div></div></div></div>
              </div>
            </div>
          
          </div>
        </div>
      </div>
      
      <!-- Example DataTables Card-->
    </div>
    <!-- /.container-fluid-->
  </div>
  <div class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true" id="fileInfo">
    <div class="modal-dialog modal-sm">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">文件详情</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          <div class="row">
            <div class="col-md-12"><strong>ID:</strong></div>
            <div class="col-md-12 break" id="fileId">12</div>
          </div>
          <div class="row">
            <div class="col-md-12"><strong>文件名:</strong></div>
            <div class="col-md-12 break" id="fileName">5c06e532e7afdb4389e4ae846ea7876c_w - 副本 - 副本.jpg</div>
          </div>
          <div class="row">
            <div class="col-md-12"><strong>源文件名:</strong></div>
            <div class="col-md-12 break" id="fileOrigin">5c06e532e7afdb4389e4ae846ea7876c_w - 副本 - 副本.jpg</div>
          </div>
          <div class="row">
            <div class="col-md-12"><strong>上传者UID:</strong></div>
            <div class="col-md-12 break" id="fileUID">17</div>
          </div>
          <div class="row">
            <div class="col-md-12"><strong>大小（字节）:</strong></div>
            <div class="col-md-12 break" id="fileSize">7481817</div>
          </div>
          <div class="row">
            <div class="col-md-12"><strong>图像尺寸:</strong></div>
            <div class="col-md-12 break" id="filePic">147,445</div>
          </div>
          <div class="row">
            <div class="col-md-12"><strong>上传策略:</strong></div>
            <div class="col-md-12 break" id="filePolicy">147,445</div>
          </div>
          <div class="row">
            <div class="col-md-12"><strong>所属目录:</strong></div>
            <div class="col-md-12 break" id="fileDir">147,445</div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">关闭</button>
        </div>
      </div>
    </div>
  </div>
  <!-- /.content-wrapper-->
  {/block}
  {block name="js"}
  <script src="/static/js/admin/group_list.js"></script>
  <script type="text/javascript">
  </script>
  {/block}